package com.mystnihon.freeremote;

import android.app.Application;

import com.mystnihon.freeremote.loader.remote.Remote;
import com.mystnihon.freeremote.manager.GuideNetworkManager;
import com.mystnihon.freeremote.manager.TransmissionManager;
import com.novoda.imageloader.core.ImageManager;
import com.novoda.imageloader.core.LoaderSettings;
import com.novoda.imageloader.core.LoaderSettings.SettingsBuilder;
import com.novoda.imageloader.core.cache.LruBitmapCache;
import com.octo.android.robospice.SpiceManager;

public class FreeRemoteApplication extends Application {
    private Remote mRemote;
    private TransmissionManager mTransmissionManager;
    private GuideNetworkManager mGuideManager;
    private ImageManager mImageManager;
    public static final SpiceManager spiceManager = new SpiceManager(FreeRemoteSpiceService.class);

    @Override
    public void onCreate() {
        mRemote = new Remote(getApplicationContext());
        mTransmissionManager = new TransmissionManager(getApplicationContext());
        mGuideManager = new GuideNetworkManager(getApplicationContext());
        LoaderSettings settings = new SettingsBuilder().withAsyncTasks(true).withCacheManager(new LruBitmapCache(this)).build(this);
        mImageManager = new ImageManager(this, settings);
        super.onCreate();
    }

    public Remote getRemote() {
        return mRemote;
    }

    public TransmissionManager getTransmissionManager() {
        return mTransmissionManager;
    }

    public GuideNetworkManager getGuideManager() {
        return mGuideManager;
    }

    public ImageManager getImageManager() {
        return mImageManager;
    }
}
